package com.heimachefu.module.resource.dao;

import com.heimachefu.module.resource.entity.ResourceEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liuxingdong@heimachefu.com
 * @date 2019/7/19 16:22
 */
@Repository
public interface ResourceRepository extends JpaRepository<ResourceEntity,Long> {
    /**
     * 根据父节点信息获取资源集合
     * @param resourceId
     * @return
     */
    List<ResourceEntity> findByParentResourceId(@Param("resourceId") Long resourceId);
}
